package com.have.blog.admin.constant;

import java.util.concurrent.TimeUnit;

/**
 * Created By Have
 * 2021/7/17 19:33
 */
public enum RedisExpiredTime {
    ONE_DAY(1, TimeUnit.DAYS),
    ONE_HOUR(1, TimeUnit.HOURS),
    SEVEN_DAY(1, TimeUnit.DAYS)
    ;

    private long duration;
    protected TimeUnit timeUnit;

    RedisExpiredTime(long duration, TimeUnit timeUnit) {
        this.duration = duration;
        this.timeUnit = timeUnit;
    }

    public long getDuration() {
        return duration;
    }

    public TimeUnit getTimeUnit() {
        return timeUnit;
    }

}
